<?php

	namespace app\models\member;

	use app\models\BaseActiveRecord;

	/**
	 * This is the model class for table "member".
	 *
	 * @property int    $id
	 * @property string $username   用户名
	 * @property string $mobile     电话号码
	 * @property string $address    用户地址
	 * @property int    $sex        性别:0=保密,1=男,2=女
	 * @property int    $createtime 创建时间
	 */
	class Member extends BaseActiveRecord
	{
		/**
		 * {@inheritdoc}
		 */
		public static function tableName () {
			return 'member';
		}

		/**
		 * {@inheritdoc}
		 */
		public function rules () {
			return [
				[['sex'], 'required'],
				[['sex', 'createtime'], 'integer'],
				[['username'], 'string', 'max' => 50],
				[['mobile'], 'string', 'max' => 11],
				[['address'], 'string', 'max' => 255],
			];
		}

		/**
		 * {@inheritdoc}
		 */
		public function attributeLabels () {
			return [
				'id'         => ' ',
				'username'   => '用户名',
				'mobile'     => '电话号码',
				'address'    => '用户地址',
				'sex'        => '性别:0=保密,1=男,2=女',
				'createtime' => '创建时间',
			];
		}
	}
